package com.sky.yipinyoufujava.service.imp;

import com.sky.yipinyoufujava.mapper.AddressMapper;
import com.sky.yipinyoufujava.pojo.from.GetSingleOrderGoodsFrom;
import com.sky.yipinyoufujava.pojo.order.OrderAddress;
import com.sky.yipinyoufujava.pojo.UserAddress;
import com.sky.yipinyoufujava.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class AddressServiceImp implements AddressService {
    @Autowired
    private AddressMapper addressMapper;

    @Override
    public List<UserAddress> getUserAddress(String userId) {
        return addressMapper.getUserAddress(userId);
    }

    @Override
    public OrderAddress getOrderAddress(GetSingleOrderGoodsFrom orderId) {
        return addressMapper.getOrderAddress(orderId);
    }
}
